package com.example.administrator.uitest.request;

import android.content.Context;

import com.example.administrator.uitest.http.HttpUrl;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Maker on 2019/4/15.
 */

public class Regiest_Request extends BaseRequest {
    private String params;
    public Regiest_Request(Context context,String params) {
        super(context);
        this.params = params;
    }

    @Override
    protected Object getHttpResult(String result) {
        String info = "";
        try {
            JSONObject jsonObject = new JSONObject(result);
            JSONObject res = jsonObject.getJSONObject("res");
            info = res.getString("status");
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return info;
    }

    @Override
    protected String setHttpURL() {
        return HttpUrl.regiest;
    }

    @Override
    protected String setHttpInface() {
        return params;
    }

    @Override
    protected String setHttpParams() {
        return "";
    }
}
